/**
* author：郝少聪
* version：1.0
**/
import React, { Component } from 'react';
import { Tabs, Button, StyleSheet } from '@ant-design/react-native';
import { Image, Text, View } from 'react-native';
import styles from '../assets/images/style';
// 普通用户组件
import UserContent from './user-search';
// 认证用户组件
import AuthContent from './auth-search';

class SearchItem extends Component {
  constructor(props) {
    super(props);
    this.state = {
      tabsList: [
        { title: '用户' },
        { title: '认证用户' },
        { title: '短视频' },
        { title: '直播' },
        { title: '名曲' },
      ],
      currentItem: {}

    }
  }

  componentDidMount() {
    this.setState({
      currentItem: this.state.tabsList[0]
    })
  }

  render() {
    let { currentItem = {}, tabsList = [] } = this.state;
    return (
      <View style={styles.box}>
        {/* 搜索 */}
        <View style={[styles.transverse]}>
          <View style={styles.search} >
            <Image style={{ width: 10, height: 10, marginLeft: 10, marginRight: 10 }} source={require('../assets/images/search.png')} />
            <Text style={styles.searchText}>戏曲</Text>
          </View>
          <Text>取消</Text>
        </View>
        {/* Tab */}
        {/* <View style={{ flex: 1, marginBottom: 17.5, marginTop: 17.5 }}>
          <View style={{ flex: 2 }}>
            <Tabs
              tabs={tabsList}
              destroyInactiveTab
              tabBarActiveTextColor={'#000'}
              tabBarInactiveTextColor={'#9d9d9d'}
              tabBarUnderlineStyle={{ backgroundColor: 'rgba(0,0,0,0)' }}
              onChange={(e) => { this.setState({ currentItem: e }) }}
            >
              <RenderContent data={currentItem} />
            </Tabs>
          </View>
        </View> */}
        {/* 用户 */}
        <AuthContent data={currentItem} />
        {/* <View>
          <View style={styles.headPortrait}>
            <Image style={{ width: 70, height: 70, borderRadius: 50, backgroundColor: '#9D9D9D' }} />
            <View style={styles.user}>
              <Text style={{ fontSize: 16, lineHeight: 22.5, color: '#DA0000' }}>戏曲洁儿</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#333333' }}>演出一切顺利</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#9D9D9D ' }}>粉丝：4345</Text>
            </View>
            <View style={styles.follow}>
              <Text style={{ lineHeight: 24, textAlign: "center", fontSize: 12, color: '#DA0000' }}><Text style={{ width: 10, height: 10 }}>+</Text>关注</Text>
            </View>
          </View>
          <View style={styles.headPortrait}>
            <Image style={{ width: 70, height: 70, borderRadius: 50, backgroundColor: '#9D9D9D' }} />
            <View style={styles.user}>
              <Text style={{ fontSize: 16, lineHeight: 22.5, color: '#DA0000' }}>ZJFF戏曲</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#333333' }}>喜欢戏曲的小萌新</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#9D9D9D ' }}>粉丝：6615</Text>
            </View>
            <View style={styles.follow}>
              <Text style={{ lineHeight: 24, textAlign: "center", fontSize: 12, color: '#DA0000' }}><Text style={{ width: 10, height: 10 }}>+</Text>关注</Text>
            </View>
          </View>
          <View style={styles.headPortrait}>
            <Image style={{ width: 70, height: 70, borderRadius: 50, backgroundColor: '#9D9D9D' }} />
            <View style={styles.user}>
              <Text style={{ fontSize: 16, lineHeight: 22.5, color: '#DA0000' }}>戏曲摄影</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#333333' }}>快来关注我，每天教你戏曲...</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#9D9D9D ' }}>粉丝：5822</Text>
            </View>
            <View style={styles.follow}>
              <Text style={{ lineHeight: 24, textAlign: "center", fontSize: 12, color: '#DA0000' }}><Text style={{ width: 10, height: 10 }}>+</Text>关注</Text>
            </View>
          </View>
          <View style={styles.headPortrait}>
            <Image style={{ width: 70, height: 70, borderRadius: 50, backgroundColor: '#9D9D9D' }} />
            <View style={styles.user}>
              <Text style={{ fontSize: 16, lineHeight: 22.5, color: '#DA0000' }}>兰州戏曲剧院-张兰</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#333333' }}></Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#9D9D9D ' }}>粉丝：5688</Text>
            </View>
            <View style={styles.follow}>
              <Text style={{ lineHeight: 24, textAlign: "center", fontSize: 12, color: '#DA0000' }}><Text style={{ width: 10, height: 10 }}>+</Text>关注</Text>
            </View>
          </View>
          <View style={styles.headPortrait}>
            <Image style={{ width: 70, height: 70, borderRadius: 50, backgroundColor: '#9D9D9D' }} />
            <View style={styles.user}>
              <Text style={{ fontSize: 16, lineHeight: 22.5, color: '#DA0000' }}>戏曲散</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#333333' }}></Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#9D9D9D ' }}>粉丝：4500</Text>
            </View>
            <View style={styles.follow}>
              <Text style={{ lineHeight: 24, textAlign: "center", fontSize: 12, color: '#DA0000' }}><Text style={{ width: 10, height: 10 }}>+</Text>关注</Text>
            </View>
          </View>
          <View style={styles.headPortrait}>
            <Image style={{ width: 70, height: 70, borderRadius: 50, backgroundColor: '#9D9D9D' }} />
            <View style={styles.user}>
              <Text style={{ fontSize: 16, lineHeight: 22.5, color: '#DA0000' }}>戏曲小生油菜花</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#333333' }}>读书，音乐，旅行，一辈子...</Text>
              <Text style={{ fontSize: 12, lineHeight: 16.5, color: '#9D9D9D ' }}>粉丝：2400</Text>
            </View>
            <View style={styles.follow}>
              <Text style={{ lineHeight: 24, textAlign: "center", fontSize: 12, color: '#DA0000' }}><Text style={{ width: 10, height: 10 }}>+</Text>关注</Text>
            </View>
          </View>
        </View>*/}
      </View> 
    );
  }
}

export default SearchItem;